import { createApp } from "vue";
// import './style.css'
import App from "./App.vue";

import ElementPlus from "element-plus";
import "element-plus/dist/index.css";

//忽略ts类型检测
//@ts-ignore
import zhCn from "element-plus/dist/locale/zh-cn.mjs";

// createApp(App).mount('#app')
const app = createApp(App);
app.use(ElementPlus, {
  locale: zhCn,
});

// 支持svg，需要在vite里配置
import "virtual:svg-icons-register";

// 注册为全局组件，如果有20个组件，要重复写20次！！
// import SvgIcon from './components/SvgIcon/index.vue'
// app.component("SvgIcon",SvgIcon)

// 用插件，在插件里统一注册
import globalComponent from "./components/index";
app.use(globalComponent);

import "./styles/index.scss";

import pinia from "./store";
app.use(pinia)

import router from "./router/index";
//mock 测试代码
// import axios from "axios"
// axios({
//   url:'/api/user/login',
//   method:"post",
//   data:{
//     username:'admin',
//     password:'111111'
//   }

// })
import "./permisstion"

app.use(router);

app.mount("#app");
// console.log(import.meta.env);
